package com.ptu.domain.entity.question;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author PTU
 * @since 2023-07-02
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("question_material")
public class Material implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long questionId;

    private String belongCourse;

    private Integer difficultLevel;

    private String knowledgeId;

    private String questionTitle;

    private String questionItem;

    private String questionAnswer;

    private Integer quantityUsed;

    private Integer correctAmount;

    private Integer errorAmount;

    private String description;

    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @JsonIgnore
    @TableLogic
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Integer isDelete;
}
